<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>~/itimer/testbench/testITimer.do.html</title>
<meta name="Generator" content="Vim/7.2">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#ffffff" text="#000000"><font face="monospace">
restart -f<br>
### Clock 10 Khz<br>
force -freeze sim:/itmer/clockinput 1 0, 0 {0.05ms} -r 0.1ms<br>
force -freeze sim:/itmer/wheelinputa 0 0<br>
force -freeze sim:/itmer/wheelinputb 0 0<br>
<br>
run 8ms<br>
# VERY FAST BEGIN SPEED ROTATION <br>
<font color="#a020f0">set</font>&nbsp;x 0<br>
<font color="#a020f0">set</font>&nbsp;speed 4&nbsp;&nbsp;<br>
<font color="#a52a2a"><b>while</b></font>&nbsp;{<font color="#a020f0">$x</font>&lt;5} {<br>
&nbsp;&nbsp;<font color="#a020f0">set</font>&nbsp;speedBetween [expr <font color="#a020f0">$speed</font>/10.0]<br>
&nbsp;&nbsp;force -freeze sim:/itmer/wheelinputa 1 0<br>
&nbsp;&nbsp;<br>
&nbsp;&nbsp;run <font color="#a020f0">$speedBetween</font>&nbsp;&nbsp;ms<br>
&nbsp;&nbsp;force -freeze sim:/itmer/wheelinputb 1 0<br>
&nbsp;&nbsp;run <font color="#a020f0">$speed</font>&nbsp;ms<br>
&nbsp;&nbsp;force -freeze sim:/itmer/wheelinputa 0 0<br>
&nbsp;&nbsp;run <font color="#a020f0">$speedBetween</font>&nbsp;ms<br>
&nbsp;&nbsp;force -freeze sim:/itmer/wheelinputb 0 0<br>
&nbsp;&nbsp;run <font color="#a020f0">$speed</font>&nbsp;ms<br>
&nbsp;&nbsp;incr speed<br>
&nbsp;&nbsp;incr x<br>
}<br>
<br>
run 1 sec<br>
<br>
# Change in mode Timer<br>
force -freeze sim:/itmer/buttoninput&nbsp;&nbsp;1 0<br>
run 0.3 sec<br>
<br>
force -freeze sim:/itmer/buttoninput&nbsp;&nbsp;0 0<br>
<br>
run 3 sec<br>
<br>
# Change in mode Pause<br>
force -freeze sim:/itmer/buttoninput&nbsp;&nbsp;1 0<br>
run 0.3 sec<br>
force -freeze sim:/itmer/buttoninput&nbsp;&nbsp;0 0<br>
run 3 sec<br>
# Change in mode Timer<br>
force -freeze sim:/itmer/buttoninput&nbsp;&nbsp;1 0<br>
run 0.3 sec<br>
force -freeze sim:/itmer/buttoninput&nbsp;&nbsp;0 0<br>
run 15 sec<br>
# Alarm<br>
force -freeze sim:/itmer/buttoninput&nbsp;&nbsp;1 0<br>
run 1.6 sec<br>
force -freeze sim:/itmer/buttoninput&nbsp;&nbsp;0 0<br>
run 3 sec<br>
<br>
# Inverse rotation<br>
<font color="#a020f0">set</font>&nbsp;x 0<br>
<font color="#a020f0">set</font>&nbsp;speed 4<br>
<font color="#a52a2a"><b>while</b></font>&nbsp;{<font color="#a020f0">$x</font>&lt;10} {<br>
&nbsp;&nbsp;<font color="#a020f0">set</font>&nbsp;speedBetween [expr <font color="#a020f0">$speed</font>/10.0]<br>
&nbsp;&nbsp;force -freeze sim:/itmer/wheelinputb 1 0<br>
&nbsp;&nbsp;run <font color="#a020f0">$speedBetween</font>&nbsp;ms<br>
&nbsp;&nbsp;force -freeze sim:/itmer/wheelinputa 1 0<br>
&nbsp;&nbsp;run <font color="#a020f0">$speed</font>&nbsp;ms<br>
&nbsp;&nbsp;force -freeze sim:/itmer/wheelinputb 0 0<br>
&nbsp;&nbsp;run <font color="#a020f0">$speedBetween</font>&nbsp;ms<br>
&nbsp;&nbsp;force -freeze sim:/itmer/wheelinputa 0 0<br>
&nbsp;&nbsp;run <font color="#a020f0">$speed</font>&nbsp;ms<br>
&nbsp;&nbsp;incr speed<br>
&nbsp;&nbsp;incr x<br>
}<br>
<br>
run 3 sec<br>
</font></body>
</html>
